package com.grass.p019lv.viewmodel;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.androidx.p013lv.base.http.BaseRes;
import com.androidx.p013lv.base.http.HttpUtils;
import com.androidx.p013lv.base.http.UrlManager;
import com.androidx.p013lv.base.http.callback.HttpCallback;
import com.grass.p019lv.bean.PiazzaBean;

/* renamed from: com.grass.lv.viewmodel.PiazzaModel */
public class PiazzaModel extends ViewModel {
    private MutableLiveData<BaseRes<PiazzaBean>> piazzaData;

    public MutableLiveData<BaseRes<PiazzaBean>> getPiazzaData() {
        if (this.piazzaData == null) {
            this.piazzaData = new MutableLiveData<>();
        }
        return this.piazzaData;
    }

    public void setPiazzaData() {
        HttpUtils.getInsatance().get(UrlManager.getInsatance().piazzaData(), new HttpCallback<BaseRes<PiazzaBean>>("piazzaData") {
            /* class com.grass.p019lv.viewmodel.PiazzaModel.C32471 */

            public void onLvSuccess(BaseRes<PiazzaBean> baseRes) {
                PiazzaModel.this.piazzaData.setValue(baseRes);
            }
        });
    }

    public void cancelHttp() {
        HttpUtils.getInsatance().cancelTag("piazzaData");
    }
}
